Copyright: Copyright © 1997 RealSoft Development


AutoCheck Property

Applies to

TrsListBox

Declaration

property AutoCheck: boolean

Description

The AutoCheck property, when set to true will check the checkboxes when the item is clicked on.  If it is false, only a click in the checkbox will check it.


AutosizeTabs Property

See Also

Applies to

TrsListBox

Declaration

property AutosizeTabs: boolean

Description

The Autosize property, when set to true will automatically scale all tabstops if the length of the listbox changes.  If you resize the form, perhaps in response to a screen resolution change, you may want to resize the listbox and other components accordingly.  With Autosizetabs, the tabstops will be moved equally. Default is false.


The FormGrow component from RealSoft will automatically resize a form and all of its components when the screen resolution changes.  It is available on our web site, or Compuserve # 12426.


Caption Property

Applies to

TrsListHeader

Declaration

property Caption: String

Description

The Caption property contains a string to be drawn in the TrsListHeader.  After begin linked to a TrsListBox using the rsListBox property, the caption can contain TabStops, Glyphs, and Styles.


Check3D Property

Applies to

TrsListBox

Declaration

property Check3D: boolean

Description

The Check3D property determines if the checkboxes will be drawn 2D or 3D.  Default is true (3D).


CheckAll Method

Applies to

TrsListBox

Declaration

procedure  CheckAll;

Description

The Checkall method will check all items in the listbox.


CheckMargin Property

Applies to

TrsListBox

Declaration

property CheckMargin: smallint

Description

The CheckMargin property determines how far text should start to the right of the checkboxes.  The default value is 20.


CheckStyle Property

Applies to

TrsListBox

Declaration

property CheckStyle: TCheckStyle

TCheckStyle = (csCheckbox, csStandard);

Description

The CheckStyle property determines whether or not you wish to use checkboxes in the listbox.


Checked Property

Applies to

TrsListBox

Declaration

property Checked[Index: smallint]: boolean

Description

The Checked property can be used to determine which items have been checked in the list.  The Index corresponds to the same numbered item in the Items property.  You can also manually check items by setting this property.  A true value means the item is checked, and false means unchecked.


Example of using Inline Glyphs

This example uses a form with a rsListBox named RLB, and a Button named Button1.  The RLB should have any glyphs loaded in Glyph1 and Glyph2.  You should add the following code to the button's OnClick event:

procedure TForm1.Button1Click(Sender: TObject);

begin

  RLB.items.add('^1   This line has a glyph at the beginning');

  RLB.items.add('^1   This line has a glyph at the beginning and the end! ^2');

end;

The numeric value (1-9) correspond to the glyph assigned to that number.  You can include multiple glyphs per line.  Remember to add enough spaces to fit the glyph, as none are made automatically.  If a glyph is too tall for the list, increase the ItemHeight property.  You can combine glyphs and Styles on the same line.


Example of using Line Styles

This example uses a form with a rsListBox named RLB, and a Button named Button1.  You should add the following code to the button's OnClick event:

procedure TForm1.Button1Click(Sender: TObject);

begin

  RLB.items.add('~B~I This line will be BOLD and ITALIC!');

  RLB.items.add('~U~2 This line will be UNDERLINED and GREEN!');

end;

Multiple styles can be included on a line by preceding it with the StyleIdent character.  [0-9 and a-f] correspond to colors, while [B,I,U,S] denote styles.  It does not matter where the symbols appear in the line.  Only that line will be affected.  To read items without the special characters, you can use the NewItems property.


GlyphIdent Property

Applies to

TrsListBox

Declaration

property GlyphIdent: Char

Description

The GlyphIdent property allows you to specify a special character that can be used to indicate a glyph should be displayed.  If you need to change this value, you should choose an obscure character.  Defaults to '^'.

Example of using Inline Glyphs


Glyphs Property

Applies to

TrsListBox

Declaration

property Glyphs: TGlyphList

Description

This property allows you to load up to Nine bitmap glyphs to be used as inline glyphs.  Empty glyph properties do not use any additional memory at all.

Example of using Inline Glyphs


HorzScrollbar Property

Applies to

TrsListBox

Declaration

property HorzScrollBar: boolean

Description

The HorzScrollBar property, when set to true will enable horizontal scrolling if any items become longer than the listbox.


LoadChecks Method

Applies to

TrsListBox

Declaration

procedure LoadChecks(filename: string)

Description

The LoadChecks method will restore a list of checked items previously saved with the SaveChecks method.  The list of items must be already loaded.


Methods
CheckAll

UnCheckAll

SaveChecks

LoadChecks


MultiCheck Property

Applies to

TrsListBox

Declaration

property MultiCheck: boolean

Description

The MultiCheck property, when set to true will enable the user to check multiple items.  The default is true.


NewItems Property

Applies to

TrsListBox

Declaration

property NewItems[Index: smallint]: String;

Description

The NewItems property allows access to listbox items that have been stripped of special formatting for inline glyphs and line styles.

Example of using Inline Glyphs

Example of using line Styles


Properties
HorzScrollBar	Checked

TabStops	NewItems

TabList

Check3D

CheckStyle

CheckMargin

MultiCheck

AutoCheck

AutosizeTabs

GlyphIdent

StyleIdent

Glyphs


Registering the trial version

If you are evaluating a trial edition of this product,

you may register on Compuserve, or the internet.

Source code for components is always included.

Product: TrsListBox and TrsListHeader

Price (US): $25.00

CIS Reg: 14895


SaveChecks Method

Applies to

TrsListBox

Declaration

procedure SaveChecks(filename: string)

Description

The SaveChecks method will store a list of checked items for later retrieval using the LoadChecks method.


TrsListHeader


rsListBox


StyleIdent Property

Applies to

TrsListBox

Declaration

property StyleIdent: Char

Description

The StyleIdent property allows you to specify a special character that can be used to indicate a line style should be displayed.  If you need to change this value, you should choose an obscure character.  Defaults to '~'.  The character after the StyleIdent determines formatting. [0-9 and a-f] correspond to colors, while [B,I,U,S] denote styles.

Example of using Line Styles

Style Characters (case sensitive)

'0' clBlack;

'1' clMaroon;

'2' clGreen;

'3' clOlive;

'4' clNavy;

'5' clPurple;

'6' clTeal;

'7' clGray;

'8' clSilver;

'9' clRed;

'a' clLime;

'b' clYellow;

'c' clBlue;

'd' clFuchsia;

'e' clAqua;

'f' :clWhite;

'B' Bold

'I' Italic

'U' Underline

'S' Strikeout


TabList Property

Applies to

TrsListBox

Declaration

property TabList: TStrings

Description

The TabList property is a string list that allows you to set tab stops at design time.  You should enter each tabstop in ascending order with one value on each line.  Do not use commas or decimal points.  Invalid entries will be read as zeroes.


TabStops Property

Applies to

TrsListBox

Declaration

property TabStops: boolean

Description

The TabStops property, when set to true will enable tabstops in the listbox.  Default is true.


TrsListBox Component

See Also     Properties     Methods

Unit

rsListbx

Description

The TrsListBox is.an enhanced version of the standard windows listbox.  The new features include Autosizing TabStops, Auto Horizontal Scrolling, 2D or 3D checkboxes, multiple in-line glyphs, and multiple line styles.  Horizontal scrolling can be enabled by setting the HorzScrollbar property.  TabStops can be enabled by setting the TabStops property, and can be set by modifying the TabList property.  Checkboxes can be displayed or hidden by modifying the CheckStyle property.  Multiple glyphs can be loaded into the Glyphs property.  Multiple Glyphs can be inserted into a line by using a GlyphIdent character.  Line styles can be specified by using a StyleIdent character.  To determine which items have been checked, use the Checked array property.  To manually check all items, call the CheckAll method.  To manually uncheck all items, call the UnCheckAll method.  To access items stipped of special formatting, use the NewItems Property.  Other properties and methods are like a standard Delphi TListBox component. (See Delphi help).

Example of using Inline Glyphs

Example of using Line Styles

Registering the trial version

Copyright 1997 RealSoft Development

Support: www.realsoftdev.com


TrsListHeader Component

See Also    Properties

Unit

rsListBx

Description

The TrsListHeader is.an add-on to the TrsListBox component.  When placed above the rsListBox, it functions as heading(s) for the tabbed columns of the listbox.  The caption property can handle tabbed text, inline glyphs, and styles like a TrsListBox.  For Tabstops, Glyphs, and Styles to work, the rsListBox property must be linked to the TrsListBox first.  The formatting will be the same as it's big brother rsListBox.

Example of using Inline Glyphs

Example of using Line Styles

Copyright 1997 RealSoft Development

www.realsoftdev.com


UnCheckAll Method

Applies to

TrsListBox

Declaration

procedure  UnCheckAll;

Description

The UnCheckall method will uncheck all items in the listbox.


rsListBox property

Applies to

TrsListHeader

Declaration

property rsListBox: TrsListBox

Description

This property is required by the TrsListHeader to link it to a rsListBox on the same form (usually directly below).  The linke provides information such as TabStops, Glyphs, Styles, and more.


Caption

BorderStyle

Ctl3D

Align

Color